---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  P:\Omar Projects\Harambee R01\Aim 3\SSM Manuscript - Analysis of GISHE Performance\\Source\LogGISHE_data.log
  log type:  text
 opened on:  15 Apr 2024, 14:57:45

.         
. ********************************************************************************
. 
. *Open Aim 1 Data Set 7 GISHE data
. use "$sourcedir\GISHE_data_clean.dta", clear    

. 
. 
. *Table 1 - Individual GISHE data initial GISHE visit [MEANS]
. preserve

. drop if  month != 0
(4,339 observations deleted)

. table1_mc,      by(arm) /// 
>                         vars(           female_bin contn %4.2f \                                ///
>                                                 age contn %4.2f \                                               ///
>                                                 mos_income_bin contn %4.2f \                    ///
>                                                 hfias_severe contn %4.2f \                              ///
>                                                 secondary_edu cat       \                                       ///
>                                                 wealthindex contn %4.2f \                               ///
>                                                 gishe_months contn %4.2f \                              ///
>                                                 WalkingDistancekm contn %4.2f \                 ///
>                                                 group_active_total contn %4.2f \                ///
>                                                 meeting_freq cat)               nospace percent_n onecol missing total(before) test saving("$sourcedir\table 1amean.xlsx", replace)

  +-------------------------------------------------------------------------------------------------+
  | factor                                                        N_T   N_1   N_2   m_T   m_1   m_2 |
  |-------------------------------------------------------------------------------------------------|
  | female_bin                                                    855   407   448     0     0     0 |
  |-------------------------------------------------------------------------------------------------|
  | Age (years)                                                   855   407   448     0     0     0 |
  |-------------------------------------------------------------------------------------------------|
  | Binary Monthly Income (KSH)                                   653   306   347   202   101   101 |
  |-------------------------------------------------------------------------------------------------|
  | hfias_severe                                                  855   407   448     0     0     0 |
  |-------------------------------------------------------------------------------------------------|
  | secondary_edu                                                 855   407   448     0     0     0 |
  |-------------------------------------------------------------------------------------------------|
  | 5 quantiles of wealthscore                                    741   351   390   114    56    58 |
  |-------------------------------------------------------------------------------------------------|
  | Number of months participating in GISHE at study enrollment   739   350   389   116    57    59 |
  |-------------------------------------------------------------------------------------------------|
  | Walking Distance (km)                                         855   407   448     0     0     0 |
  |-------------------------------------------------------------------------------------------------|
  | group_active_total                                            855   407   448     0     0     0 |
  |-------------------------------------------------------------------------------------------------|
  | Frequency of group meeting schedule                           855   407   448     0     0     0 |
  +-------------------------------------------------------------------------------------------------+
   N_ ... #records used below,   m_ ... #records not used
 
  +------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  |                                                               Total           Community-based Care (Arm A)   Facility-based Care (Arm B)   Test          p-value |
  |------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  |                                                               N=855           N=407                          N=448                                               |
  |------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | female_bin                                                    0.75 (0.43)     0.75 (0.43)                    0.75 (0.43)                   Ind. t test    0.98   |
  |------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | Age (years)                                                   51.54 (11.38)   51.73 (11.08)                  51.37 (11.66)                 Ind. t test    0.65   |
  |------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | Binary Monthly Income (KSH)                                   0.66 (0.47)     0.67 (0.47)                    0.65 (0.48)                   Ind. t test    0.56   |
  |------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | hfias_severe                                                  0.22 (0.41)     0.22 (0.41)                    0.22 (0.42)                   Ind. t test    0.87   |
  |------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | secondary_edu                                                                                                                              Chi-square     0.16   |
  |    0                                                          20.4% (174)     22.4% (91)                     18.5% (83)                                          |
  |    1                                                          79.6% (681)     77.6% (316)                    81.5% (365)                                         |
  |------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | 5 quantiles of wealthscore                                    2.91 (1.41)     2.98 (1.44)                    2.86 (1.37)                   Ind. t test    0.25   |
  |------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | Number of months participating in GISHE at study enrollment   62.89 (62.79)   64.17 (64.41)                  61.74 (61.36)                 Ind. t test    0.60   |
  |------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | Walking Distance (km)                                         12.79 (17.77)   14.29 (20.39)                  11.43 (14.89)                 Ind. t test    0.019  |
  |------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | group_active_total                                            16.16 (6.46)    15.51 (6.08)                   16.76 (6.73)                  Ind. t test    0.005  |
  |------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | Frequency of group meeting schedule                                                                                                        Chi-square    <0.001  |
  |    Weekly                                                     15.3% (131)     19.2% (78)                     11.8% (53)                                          |
  |    Bi-monthly                                                 49.8% (426)     37.1% (151)                    61.4% (275)                                         |
  |    Monthly                                                    34.9% (298)     43.7% (178)                    26.8% (120)                                         |
  +------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Data are presented as mean (SD) for continuous measures, and % (n) for categorical measures.
 
file P:\Omar Projects\Harambee R01\Aim 3\SSM Manuscript - Analysis of GISHE Performance\\Source\table 1amean.xlsx saved

. 
. restore 

. 
. *Table 1 - Individual GISHE data initial GISHE visit [MEDIANS]
. preserve

. drop if  month != 0
(4,339 observations deleted)

. table1_mc,      by(arm) /// 
>                         vars(           female_bin cat %4.2f \                                  ///
>                                                 age conts %4.2f \                                               ///
>                                                 mos_income_bin cat %4.2f \                              ///
>                                                 hfias_severe cat %4.2f \                                ///
>                                                 secondary_edu cat %4.2f \                               ///
>                                                 wealthindex conts %4.2f \                               ///
>                                                 gishe_months conts %4.2f \                              ///
>                                                 WalkingDistancekm conts %4.2f \                 ///
>                                                 group_active_total conts %4.2f \                ///
>                                                 meeting_freq cat)               nospace percent_n onecol missing total(before) test saving("$sourcedir\table 1amedian.xlsx", replace)

  +-------------------------------------------------------------------------------------------------+
  | factor                                                        N_T   N_1   N_2   m_T   m_1   m_2 |
  |-------------------------------------------------------------------------------------------------|
  | female_bin                                                    855   407   448     0     0     0 |
  |-------------------------------------------------------------------------------------------------|
  | Age (years)                                                   855   407   448     0     0     0 |
  |-------------------------------------------------------------------------------------------------|
  | Binary Monthly Income (KSH)                                   855   407   448     0     0     0 |
  |-------------------------------------------------------------------------------------------------|
  | hfias_severe                                                  855   407   448     0     0     0 |
  |-------------------------------------------------------------------------------------------------|
  | secondary_edu                                                 855   407   448     0     0     0 |
  |-------------------------------------------------------------------------------------------------|
  | 5 quantiles of wealthscore                                    741   351   390   114    56    58 |
  |-------------------------------------------------------------------------------------------------|
  | Number of months participating in GISHE at study enrollment   739   350   389   116    57    59 |
  |-------------------------------------------------------------------------------------------------|
  | Walking Distance (km)                                         855   407   448     0     0     0 |
  |-------------------------------------------------------------------------------------------------|
  | group_active_total                                            855   407   448     0     0     0 |
  |-------------------------------------------------------------------------------------------------|
  | Frequency of group meeting schedule                           855   407   448     0     0     0 |
  +-------------------------------------------------------------------------------------------------+
   N_ ... #records used below,   m_ ... #records not used
 
  +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  |                                                               Total                  Community-based Care (Arm A)   Facility-based Care (Arm B)   Test                p-value |
  |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  |                                                               N=855                  N=407                          N=448                                                     |
  |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | female_bin                                                                                                                                        Chi-square           0.98   |
  |    0                                                          25.03% (214)           25.06% (102)                   25.00% (112)                                              |
  |    1                                                          74.97% (641)           74.94% (305)                   75.00% (336)                                              |
  |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | Age (years)                                                   52.00 (43.00-60.00)    53.00 (44.00-59.00)            51.00 (42.50-61.00)           Wilcoxon rank-sum    0.62   |
  |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | Binary Monthly Income (KSH)                                                                                                                       Chi-square           0.62   |
  |    <5,000 KES or N/A/Don't Know/Refuse                        25.85% (221)           24.57% (100)                   27.01% (121)                                              |
  |    >=5,000 KSH ($50 USD)                                      50.53% (432)           50.61% (206)                   50.45% (226)                                              |
  |    Missing                                                    23.63% (202)           24.82% (101)                   22.54% (101)                                              |
  |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | hfias_severe                                                                                                                                      Chi-square           0.87   |
  |    0                                                          78.13% (668)           78.38% (319)                   77.90% (349)                                              |
  |    1                                                          21.87% (187)           21.62% (88)                    22.10% (99)                                               |
  |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | secondary_edu                                                                                                                                     Chi-square           0.16   |
  |    0                                                          20.35% (174)           22.36% (91)                    18.53% (83)                                               |
  |    1                                                          79.65% (681)           77.64% (316)                   81.47% (365)                                              |
  |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | 5 quantiles of wealthscore                                    3.00 (2.00-4.00)       3.00 (2.00-4.00)               3.00 (2.00-4.00)              Wilcoxon rank-sum    0.27   |
  |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | Number of months participating in GISHE at study enrollment   34.00 (12.00-101.00)   32.00 (11.00-113.00)           35.00 (12.00-94.00)           Wilcoxon rank-sum    0.96   |
  |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | Walking Distance (km)                                         5.60 (2.70-12.30)      6.00 (2.70-13.90)              5.40 (2.70-12.30)             Wilcoxon rank-sum    0.059  |
  |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | group_active_total                                            15.00 (12.00-20.00)    15.00 (12.00-17.00)            16.00 (11.00-21.00)           Wilcoxon rank-sum    0.011  |
  |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | Frequency of group meeting schedule                                                                                                               Chi-square          <0.001  |
  |    Weekly                                                     15.3% (131)            19.2% (78)                     11.8% (53)                                                |
  |    Bi-monthly                                                 49.8% (426)            37.1% (151)                    61.4% (275)                                               |
  |    Monthly                                                    34.9% (298)            43.7% (178)                    26.8% (120)                                               |
  +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Data are presented as median (IQR) for continuous measures, and % (n) for categorical measures.
 
file P:\Omar Projects\Harambee R01\Aim 3\SSM Manuscript - Analysis of GISHE Performance\\Source\table 1amedian.xlsx saved

. 
. restore 

. 
. 
. *Table 1 - Group-level GISHE data initial GISHE visit [Median]
. preserve 

. keep if visit_month !="month 0"
(855 observations deleted)

. table1_mc,      by(arm) /// 
>                         vars(   num_meetings_scheduled conts %4.2f \                                    ///     
>                                         num_meetings conts %4.2f \      ///
>                                         prop_attended_18 conts %4.2f )          nospace percent_n onecol missing total(before) test

  +---------------------------------------------------------------------------------------------------+
  | factor                                                      N_T     N_1     N_2   m_T   m_1   m_2 |
  |---------------------------------------------------------------------------------------------------|
  | num_meetings_scheduled                                    4,339   2,049   2,290     0     0     0 |
  |---------------------------------------------------------------------------------------------------|
  | Number of meetings attended over 18 month trial           4,339   2,049   2,290     0     0     0 |
  |---------------------------------------------------------------------------------------------------|
  | Proportion of meetings attended over 18 months of trial   4,339   2,049   2,290     0     0     0 |
  +---------------------------------------------------------------------------------------------------+
   N_ ... #records used below,   m_ ... #records not used
 
  +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  |                                                           Total                 Community-based Care (Arm A)   Facility-based Care (Arm B)   Test                p-value |
  |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  |                                                           N=4,339               N=2,049                        N=2,290                                                   |
  |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | num_meetings_scheduled                                    33.00 (21.00-35.00)   31.00 (22.00-35.00)            33.00 (21.00-35.00)           Wilcoxon rank-sum    0.12   |
  |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | Number of meetings attended over 18 month trial           19.00 (13.00-28.00)   21.00 (13.00-30.00)            18.00 (13.00-27.00)           Wilcoxon rank-sum   <0.001  |
  |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | Proportion of meetings attended over 18 months of trial   0.76 (0.55-0.89)      0.76 (0.57-0.88)               0.77 (0.50-0.92)              Wilcoxon rank-sum    0.53   |
  +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Data are presented as median (IQR).
 

. restore

.                                                 
. distinct participant_id //855

                |        Observations
                |      total   distinct
----------------+----------------------
 participant_id |       5194        855

. 
. 
. ***keep only the participants that have at least 1 follow-up GISHE visit
. set sortseed 123456 

. capture drop nid 

. bys id: gen nid=[_N]

. codebook nid //77 observations with only one data point

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
nid                                                                                                                                                                                                                                                 (unlabeled)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                  Type: Numeric (float)

                 Range: [1,7]                         Units: 1
         Unique values: 7                         Missing .: 0/5,194

            Tabulation: Freq.  Value
                           77  1
                           98  2
                           33  3
                           36  4
                           15  5
                           42  6
                        4,893  7

. keep if nid>1 //77 obs deleted
(77 observations deleted)

. tab nid //95.6% of participants have data for all 6 follow up GISHE visits over 18 months

        nid |      Freq.     Percent        Cum.
------------+-----------------------------------
          2 |         98        1.92        1.92
          3 |         33        0.64        2.56
          4 |         36        0.70        3.26
          5 |         15        0.29        3.56
          6 |         42        0.82        4.38
          7 |      4,893       95.62      100.00
------------+-----------------------------------
      Total |      5,117      100.00

. 
. *declare panel data
. xtset id time

Panel variable: id (unbalanced)
 Time variable: time, 1 to 7, but with gaps
         Delta: 1 unit

. xtdescribe //778 individuals in data set; 7 time points

      id:  1, 2, ..., 855                                    n =        778
    time:  1, 2, ..., 7                                      T =          7
           Delta(time) = 1 unit
           Span(time)  = 7 periods
           (id*time uniquely identifies each observation)

Distribution of T_i:   min      5%     25%       50%       75%     95%     max
                         2       2       7         7         7       7       7

     Freq.  Percent    Cum. |  Pattern
 ---------------------------+---------
      699     89.85   89.85 |  1111111
       44      5.66   95.50 |  1..1...
        6      0.77   96.27 |  111111.
        5      0.64   96.92 |  1..1..1
        5      0.64   97.56 |  111....
        4      0.51   98.07 |  11.....
        4      0.51   98.59 |  111...1
        3      0.39   98.97 |  11.1..1
        1      0.13   99.10 |  1.....1
        7      0.90  100.00 | (other patterns)
 ---------------------------+---------
      778    100.00         |  XXXXXXX

. 
. *inorder to define covariate list, data need to be complete for each time point
.         *fill down the covariates at enrollment 
.         set sortseed 123456

.         bysort participant_id : carryforward schooling_achieved, gen(educ)
educ:  (2,875 real changes made)

.         
.         replace mos_income=0 if mos_income==5 //make don't know category the lowest for easier coefficient interpretation
(0 real changes made)

.         bysort participant_id : carryforward mos_income, gen(mincome)
mincome:  (2,837 real changes made)

. 
.         gen distance_bin = 1 if WalkingDistancekm>=20
(3,995 missing values generated)

.         replace distance_bin = 0 if WalkingDistancekm <20
(3,995 real changes made)

. 
.         bysort participant_id: carryforward distance_bin, gen(distancebin)
distancebin:  (0 real changes made)

.         
.         bysort participant_id: carryforward mos_income_bin, gen(income_bin)
income_bin:  (2,837 real changes made)

.         
.         gen biweekly_group = 1 if meeting_freq==2
(2,848 missing values generated)

.         bysort participant_id: carryforward biweekly_group, gen(biweekly)
biweekly:  (194 real changes made)

.         
.         capture drop educ_bin

.         bysort participant_id: carryforward secondary_edu, gen(educ_bin) 
educ_bin:  (0 real changes made)

. 
.         label var educ_bin "At least secondary education completed"

.         capture label define educ1 1 "Yes"  0"No"

.         label values educ_bin educ1

.                 
.         capture drop educ_bin 

.         capture drop educbin

.         gen educ_bin = 1 if educ>=3
(3,986 missing values generated)

.         replace educ_bin = 0 if educ <3 
(3,986 real changes made)

.         label var educ_bin "At least secondary education completed"

.         capture label define educ1 1 "Yes"  0"No"

.         label values educ_bin educ1

. 
. set scheme s2gcolor

. 
. *convert KES to USD (2019 World Bank exchange rate) and re-run adjusted twopm
. gen total_shares_purchased_usd =  (total_shares_purchased/101.99)
(863 missing values generated)

. 
. *conservatively assume that those with missing data did not purchase any shares 
. replace total_shares_purchased_usd=0 if total_shares_purchased_usd==. 
(863 real changes made)

. 
. *create a binary indicator of spending any amount of shares
. gen shares_yn = 1 if total_shares_purchased_usd >0 & total_shares_purchased_usd !=. 
(1,632 missing values generated)

. replace shares_yn = 0 if total_shares_purchased_usd==0 
(1,632 real changes made)

. 
. 
. ****Supplementary Table 1. 
. *what is the probability of spending any amount based on randomization assignment?
. regress shares_yn tx if time!=. //66.9% propability of >0 spending in control arm

      Source |       SS           df       MS      Number of obs   =     5,117
-------------+----------------------------------   F(1, 5115)      =      3.50
       Model |  .760519408         1  .760519408   Prob > F        =    0.0613
    Residual |   1110.7345     5,115  .217152394   R-squared       =    0.0007
-------------+----------------------------------   Adj R-squared   =    0.0005
       Total |  1111.49502     5,116  .217258604   Root MSE        =      .466

------------------------------------------------------------------------------
   shares_yn | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
          tx |   .0244177   .0130477     1.87   0.061    -.0011613    .0499967
       _cons |   .6695104   .0089748    74.60   0.000      .651916    .6871047
------------------------------------------------------------------------------

. regress shares_yn tx##time if time!=. 

      Source |       SS           df       MS      Number of obs   =     5,117
-------------+----------------------------------   F(13, 5103)     =    254.51
       Model |  437.197363        13  33.6305664   Prob > F        =    0.0000
    Residual |  674.297653     5,103  .132137498   R-squared       =    0.3933
-------------+----------------------------------   Adj R-squared   =    0.3918
       Total |  1111.49502     5,116  .217258604   Root MSE        =    .36351

---------------------------------------------------------------------------------------
            shares_yn | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
----------------------+----------------------------------------------------------------
                   tx |
  Receiving ICB Care  |   .0026882   .0260897     0.10   0.918    -.0484587    .0538351
                      |
                 time |
                   2  |   .7161458    .025876    27.68   0.000     .6654177     .766874
                   3  |    .883905   .0259636    34.04   0.000     .8330052    .9348048
                   4  |   .8211587   .0256574    32.00   0.000     .7708592    .8714582
                   5  |         .8   .0260351    30.73   0.000       .74896      .85104
                   6  |   .7727273   .0260532    29.66   0.000     .7216518    .8238028
                   7  |   .7349081   .0259284    28.34   0.000     .6840774    .7857388
                      |
              tx#time |
Receiving ICB Care#2  |   .1091543   .0375502     2.91   0.004     .0355398    .1827689
Receiving ICB Care#3  |   .0281127   .0376558     0.75   0.455    -.0457088    .1019342
Receiving ICB Care#4  |  -.0293263   .0370881    -0.79   0.429     -.102035    .0433824
Receiving ICB Care#5  |   .0231377   .0378133     0.61   0.541    -.0509926     .097268
Receiving ICB Care#6  |   .0288014   .0378416     0.76   0.447    -.0453843    .1029871
Receiving ICB Care#7  |   .0124037   .0376929     0.33   0.742    -.0614905    .0862979
                      |
                _cons |   4.33e-15   .0180406     0.00   1.000    -.0353672    .0353672
---------------------------------------------------------------------------------------

. estimates store regress

. margins, dydx(*) //2.7 percentage points higher (from a probability of 66.9% in the standard of care arm)

Average marginal effects                                 Number of obs = 5,117
Model VCE: OLS

Expression: Linear prediction, predict()
dy/dx wrt:  1.tx 2.time 3.time 4.time 5.time 6.time 7.time

-------------------------------------------------------------------------------------
                    |            Delta-method
                    |      dy/dx   std. err.      t    P>|t|     [95% conf. interval]
--------------------+----------------------------------------------------------------
                 tx |
Receiving ICB Care  |   .0266925   .0101783     2.62   0.009     .0067387    .0466464
                    |
               time |
                 2  |   .7677899   .0187515    40.95   0.000     .7310289    .8045508
                 3  |   .8972059   .0188053    47.71   0.000     .8603395    .9340724
                 4  |   .8072836   .0185282    43.57   0.000     .7709604    .8436067
                 5  |   .8109471   .0188812    42.95   0.000     .7739318    .8479624
                 6  |   .7863541   .0188952    41.62   0.000     .7493113    .8233968
                 7  |   .7407767   .0188193    39.36   0.000     .7038827    .7776706
-------------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.

. 
. 
. 
. ****TABLE 2. 
. *define covariate list 
. global xlist age i.female_bin i.educ_bin i.income_bin gishe_months WalkingDistancekm no_of_meetings_attended group_active_total meeting_freq

. 
. 
. **18-month pooled effects
. bysort participant_id: egen total_shares = sum(total_shares_purchased_usd)

. 
. *unadjusted 
. twopm total_shares tx if time!=. & time!=1 , firstpart(probit) secondpart(glm, family(gamma) link(log)) re vce(cluster study_group_id) 

Fitting probit regression for first part:

Iteration 0:  Log pseudolikelihood = -445.54987  
Iteration 1:  Log pseudolikelihood = -445.26897  
Iteration 2:  Log pseudolikelihood = -445.26883  
Iteration 3:  Log pseudolikelihood = -445.26883  

Fitting glm regression for second part:

Iteration 0:  Log pseudolikelihood = -19469.787  
Iteration 1:  Log pseudolikelihood =  -18982.64  
Iteration 2:  Log pseudolikelihood = -18978.782  
Iteration 3:  Log pseudolikelihood = -18978.779  
Iteration 4:  Log pseudolikelihood = -18978.779  

Two-part model
------------------------------------------------------------------------------
Log pseudolikelihood = -19424.048                 Number of obs   =       4339

Part 1: probit
------------------------------------------------------------------------------
                                                  Number of obs   =       4339
                                                  Wald chi2(1)    =       0.11
                                                  Prob > chi2     =     0.7394
Log pseudolikelihood = -445.26883                 Pseudo R2       =     0.0006

Part 2: glm
------------------------------------------------------------------------------
                                                   Number of obs   =      4247
Deviance         =  5613.733118                    (1/df) Deviance =  1.322434
Pearson          =  12499.77522                    (1/df) Pearson  =  2.944588

Variance function: V(u) = u^2                      [Gamma]
Link function    : g(u) = ln(u)                    [Log]

                                                   AIC             =  8.938441
Log pseudolikelihood = -18978.77933                BIC             = -29848.86
                        (Std. err. adjusted for 57 clusters in study_group_id)
------------------------------------------------------------------------------
             |               Robust
total_shares | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
probit       |
          tx |  -.0644861     .19389    -0.33   0.739    -.4445034    .3155313
       _cons |   2.061018   .1448952    14.22   0.000     1.777029    2.345008
-------------+----------------------------------------------------------------
glm          |
          tx |   .6304445   .3242292     1.94   0.052    -.0050332    1.265922
       _cons |   3.171563   .2054822    15.43   0.000     2.768826    3.574301
------------------------------------------------------------------------------

. margins if tx==0
warning: prediction constant over observations.

Predictive margins                                       Number of obs = 2,290
Model VCE: Robust

Expression: twopm combined expected values, predict()

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
       _cons |   23.37617   4.806213     4.86   0.000     13.95616    32.79617
------------------------------------------------------------------------------

. margins if tx==1
warning: prediction constant over observations.

Predictive margins                                       Number of obs = 2,049
Model VCE: Robust

Expression: twopm combined expected values, predict()

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
       _cons |   43.76361   10.98449     3.98   0.000     22.23441    65.29281
------------------------------------------------------------------------------

. margins, dydx(tx)

Average marginal effects                                 Number of obs = 4,339
Model VCE: Robust

Expression: twopm combined expected values, predict()
dy/dx wrt:  tx

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
          tx |   20.69414   12.64926     1.64   0.102     -4.09796    45.48623
------------------------------------------------------------------------------

. margins, dydx(*) 

Average marginal effects                                 Number of obs = 4,339
Model VCE: Robust

Expression: twopm combined expected values, predict()
dy/dx wrt:  tx

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
          tx |   20.69414   12.64926     1.64   0.102     -4.09796    45.48623
------------------------------------------------------------------------------

. 
. *adjusted
. twopm total_shares tx $xlist if time!=. & time!=1 , firstpart(probit) secondpart(glm, family(gamma) link(log)) re vce(cluster study_group_id) 

Fitting probit regression for first part:

Iteration 0:  Log pseudolikelihood = -164.52835  
Iteration 1:  Log pseudolikelihood = -140.16062  
Iteration 2:  Log pseudolikelihood = -128.50533  
Iteration 3:  Log pseudolikelihood = -127.91873  
Iteration 4:  Log pseudolikelihood = -127.91419  
Iteration 5:  Log pseudolikelihood = -127.91419  

Fitting glm regression for second part:

Iteration 0:  Log pseudolikelihood = -15690.361  
Iteration 1:  Log pseudolikelihood = -15526.361  
Iteration 2:  Log pseudolikelihood = -15525.066  
Iteration 3:  Log pseudolikelihood = -15525.065  

Two-part model
------------------------------------------------------------------------------
Log pseudolikelihood =  -15652.98                 Number of obs   =       3685

Part 1: probit
------------------------------------------------------------------------------
                                                  Number of obs   =       3685
                                                  Wald chi2(10)   =     238.95
                                                  Prob > chi2     =     0.0000
Log pseudolikelihood = -127.91419                 Pseudo R2       =     0.2225

Part 2: glm
------------------------------------------------------------------------------
                                                   Number of obs   =      3657
Deviance         =  3162.076478                    (1/df) Deviance =  .8672728
Pearson          =   5033.15828                    (1/df) Pearson  =   1.38046

Variance function: V(u) = u^2                      [Gamma]
Link function    : g(u) = ln(u)                    [Log]

                                                   AIC             =  8.496618
Log pseudolikelihood = -15525.06539                BIC             = -26751.16
                                   (Std. err. adjusted for 57 clusters in study_group_id)
-----------------------------------------------------------------------------------------
                        |               Robust
           total_shares | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
------------------------+----------------------------------------------------------------
probit                  |
                     tx |   .3952186   .2717655     1.45   0.146    -.1374321    .9278692
                    age |  -.0016577   .0157335    -0.11   0.916    -.0324947    .0291794
                        |
             female_bin |
                     1  |   .0621865   .2823241     0.22   0.826    -.4911586    .6155316
                        |
               educ_bin |
                   Yes  |  -.1230932   .2653551    -0.46   0.643    -.6431796    .3969931
                        |
             income_bin |
 >=5,000 KSH ($50 USD)  |   .2703515   .1327876     2.04   0.042     .0100925    .5306106
                        |
           gishe_months |   -.001269   .0012746    -1.00   0.319    -.0037671    .0012291
      WalkingDistancekm |   -.009237   .0057815    -1.60   0.110    -.0205685    .0020944
no_of_meetings_attended |   .3933838   .1203551     3.27   0.001     .1574923    .6292754
     group_active_total |   .0354691   .0217213     1.63   0.102    -.0071039    .0780422
           meeting_freq |   .0939224   .2230404     0.42   0.674    -.3432288    .5310736
                  _cons |   .9652755   1.106268     0.87   0.383    -1.202969     3.13352
------------------------+----------------------------------------------------------------
glm                     |
                     tx |   .5220796   .2163054     2.41   0.016     .0981288    .9460303
                    age |   .0030831   .0040148     0.77   0.443    -.0047857     .010952
                        |
             female_bin |
                     1  |   .2542425   .0946784     2.69   0.007     .0686762    .4398087
                        |
               educ_bin |
                   Yes  |   .2871698   .1011141     2.84   0.005     .0889898    .4853498
                        |
             income_bin |
 >=5,000 KSH ($50 USD)  |   .1069732   .0660885     1.62   0.106    -.0225578    .2365043
                        |
           gishe_months |    .002667   .0011264     2.37   0.018     .0004592    .0048747
      WalkingDistancekm |   .0053475   .0062437     0.86   0.392    -.0068899    .0175848
no_of_meetings_attended |   .1424342   .0175077     8.14   0.000     .1081197    .1767487
     group_active_total |   .0418533     .01706     2.45   0.014     .0084163    .0752903
           meeting_freq |  -.3073317   .1477194    -2.08   0.037    -.5968564    -.017807
                  _cons |   1.714339   .5031881     3.41   0.001      .728108    2.700569
-----------------------------------------------------------------------------------------

. estimates store pooled

. margins if tx==0
warning: cannot perform check for estimable functions.

Predictive margins                                       Number of obs = 1,874
Model VCE: Robust

Expression: twopm combined expected values, predict()

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
       _cons |   25.24155   4.526515     5.58   0.000     16.36974    34.11335
------------------------------------------------------------------------------

. margins if tx==1
warning: cannot perform check for estimable functions.

Predictive margins                                       Number of obs = 1,811
Model VCE: Robust

Expression: twopm combined expected values, predict()

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
       _cons |   44.90155   8.179095     5.49   0.000     28.87082    60.93228
------------------------------------------------------------------------------

. margins, dydx(tx)
warning: cannot perform check for estimable functions.

Average marginal effects                                 Number of obs = 3,685
Model VCE: Robust

Expression: twopm combined expected values, predict()
dy/dx wrt:  tx

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
          tx |     18.339    8.75013     2.10   0.036     1.189057    35.48894
------------------------------------------------------------------------------

. margins, dydx(*) 
warning: cannot perform check for estimable functions.

Average marginal effects                                 Number of obs = 3,685
Model VCE: Robust

Expression: twopm combined expected values, predict()
dy/dx wrt:  tx age 1.female_bin 1.educ_bin 1.income_bin gishe_months WalkingDistancekm no_of_meetings_attended group_active_total meeting_freq

-----------------------------------------------------------------------------------------
                        |            Delta-method
                        |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
------------------------+----------------------------------------------------------------
                     tx |     18.339    8.75013     2.10   0.036     1.189057    35.48894
                    age |   .1071235   .1438251     0.74   0.456    -.1747685    .3890155
           1.female_bin |   8.270933   3.039824     2.72   0.007     2.312987    14.22888
                        |
               educ_bin |
                   Yes  |    10.7994   4.660868     2.32   0.021     1.664264    19.93453
                        |
             income_bin |
 >=5,000 KSH ($50 USD)  |   3.749128   2.378379     1.58   0.115     -.912409    8.410666
           gishe_months |   .0927122   .0469359     1.98   0.048     .0007196    .1847049
      WalkingDistancekm |   .1839212   .2235673     0.82   0.411    -.2542626    .6221051
no_of_meetings_attended |   5.087507   .9661113     5.27   0.000     3.193964    6.981051
     group_active_total |   1.471291   .7104779     2.07   0.038     .0787801    2.863802
           meeting_freq |  -10.69924   6.304635    -1.70   0.090     -23.0561    1.657617
-----------------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.

. esttab pooled using "$sourcedir\tablepooled.csv", replace se starl( * 0.10 ** 0.05 *** 0.010) varwidth(25) label  interaction(" X ") title(Table 2: Pooled TwoPM Analysis) legend varlabels(_cons constant) stats(r2 df_r bic, fmt(3 0 1) label(R-sqr dfres B
> IC))
(output written to P:\Omar Projects\Harambee R01\Aim 3\SSM Manuscript - Analysis of GISHE Performance\Source\tablepooled.csv)

. 
. 
. 
. **Supplementary Table 2A and 2B. treatment-by-time 
. *unadjusted
. twopm total_shares_purchased_usd tx##time if time!=. , firstpart(probit) secondpart(glm, family(gamma) link(log)) re vce(cluster study_group_id)

Fitting probit regression for first part:

note: 0.tx#1.time != 0 predicts failure perfectly;
      0.tx#1.time omitted and 406 obs not used.

note: 1.tx#7.time omitted because of collinearity.
Iteration 0:  Log pseudolikelihood = -2700.8628  
Iteration 1:  Log pseudolikelihood = -2136.1075  
Iteration 2:  Log pseudolikelihood = -2117.8763  
Iteration 3:  Log pseudolikelihood =  -2116.095  
Iteration 4:  Log pseudolikelihood = -2116.0362  
Iteration 5:  Log pseudolikelihood = -2116.0361  

Fitting glm regression for second part:
note: 0.tx#1.time identifies no observations in the sample.
note: 1.tx#7.time omitted because of collinearity.

Iteration 0:  Log pseudolikelihood = -10458.696  
Iteration 1:  Log pseudolikelihood =  -9995.761  
Iteration 2:  Log pseudolikelihood = -9992.7006  
Iteration 3:  Log pseudolikelihood = -9992.6985  
Iteration 4:  Log pseudolikelihood = -9992.6985  

Two-part model
------------------------------------------------------------------------------
Log pseudolikelihood = -12108.735                 Number of obs   =       4711

Part 1: probit
------------------------------------------------------------------------------
                                                  Number of obs   =       4711
                                                  Wald chi2(12)   =     163.09
                                                  Prob > chi2     =     0.0000
Log pseudolikelihood = -2116.0361                 Pseudo R2       =     0.2165

Part 2: glm
------------------------------------------------------------------------------
                                                   Number of obs   =      3485
Deviance         =  4858.070147                    (1/df) Deviance =  1.398811
Pearson          =  10256.63414                    (1/df) Pearson  =  2.953249

Variance function: V(u) = u^2                      [Gamma]
Link function    : g(u) = ln(u)                    [Log]

                                                   AIC             =  5.741577
Log pseudolikelihood =  -9992.69848                BIC             = -23468.49
                                 (Std. err. adjusted for 57 clusters in study_group_id)
---------------------------------------------------------------------------------------
                      |               Robust
total_shares_purch~sd | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
----------------------+----------------------------------------------------------------
probit                |
                   tx |
  Receiving ICB Care  |   .0467642   .2550215     0.18   0.855    -.4530689    .5465972
                      |
                 time |
                   2  |   3.401767   .3967636     8.57   0.000     2.624125    4.179409
                   3  |   4.025074   .4427325     9.09   0.000     3.157334    4.892814
                   4  |   3.750127   .4329221     8.66   0.000     2.901615    4.598639
                   5  |   3.671958    .447215     8.21   0.000     2.795433    4.548484
                   6  |   3.578196    .384664     9.30   0.000     2.824268    4.332124
                   7  |   3.458063   .3498253     9.89   0.000     2.772418    4.143708
                      |
              tx#time |
Receiving ICB Care#2  |   .3280516   .3330435     0.99   0.325    -.3247017    .9808048
Receiving ICB Care#3  |   .1288154   .4011324     0.32   0.748    -.6573897    .9150206
Receiving ICB Care#4  |  -.1443466   .3433482    -0.42   0.674    -.8172967    .5286036
Receiving ICB Care#5  |   .0494123    .389116     0.13   0.899    -.7132411    .8120657
Receiving ICB Care#6  |   .0621576   .2339409     0.27   0.790    -.3963581    .5206733
                      |
                _cons |  -2.830337   .3965021    -7.14   0.000    -3.607467   -2.053207
----------------------+----------------------------------------------------------------
glm                   |
                   tx |
  Receiving ICB Care  |   .5576338   .4537936     1.23   0.219    -.3317854    1.447053
                      |
                 time |
                   2  |   .8510707   .3584054     2.37   0.018     .1486091    1.553532
                   3  |   .9337835   .4475563     2.09   0.037     .0565892    1.810978
                   4  |   .8571864   .3936876     2.18   0.029     .0855728      1.6288
                   5  |      .7842   .3856963     2.03   0.042     .0282492    1.540151
                   6  |   .9626506   .3589414     2.68   0.007     .2591383    1.666163
                   7  |   1.141558   .2909102     3.92   0.000     .5713845    1.711732
                      |
              tx#time |
Receiving ICB Care#2  |  -.2039885    .326575    -0.62   0.532    -.8440638    .4360868
Receiving ICB Care#3  |  -.3444159   .3897134    -0.88   0.377     -1.10824    .4194084
Receiving ICB Care#4  |   .2952079   .3197034     0.92   0.356    -.3313992     .921815
Receiving ICB Care#5  |   .3526668   .3177553     1.11   0.267    -.2701221    .9754557
Receiving ICB Care#6  |   -.003692    .283459    -0.01   0.990    -.5592615    .5518775
                      |
                _cons |   .6754246   .4537936     1.49   0.137    -.2139946    1.564844
---------------------------------------------------------------------------------------

. estimates store atpm

. margins, dydx(tx)
warning: cannot perform check for estimable functions.

Average marginal effects                                 Number of obs = 4,711
Model VCE: Robust

Expression: twopm combined expected values, predict()
dy/dx wrt:  1.tx

-------------------------------------------------------------------------------------
                    |            Delta-method
                    |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
--------------------+----------------------------------------------------------------
                 tx |
Receiving ICB Care  |   3.131542   1.794331     1.75   0.081    -.3852829    6.648366
-------------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.

. margins, dydx(*) //2.4377 0.050
warning: cannot perform check for estimable functions.

Average marginal effects                                 Number of obs = 4,711
Model VCE: Robust

Expression: twopm combined expected values, predict()
dy/dx wrt:  1.tx 2.time 3.time 4.time 5.time 6.time 7.time

-------------------------------------------------------------------------------------
                    |            Delta-method
                    |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
--------------------+----------------------------------------------------------------
                 tx |
Receiving ICB Care  |   3.131542   1.794331     1.75   0.081    -.3852829    6.648366
                    |
               time |
                 2  |   4.384024   .8737708     5.02   0.000     2.671464    6.096583
                 3  |   5.049117    .705098     7.16   0.000      3.66715    6.431083
                 4  |   6.277099   1.328446     4.73   0.000     3.673391    8.880806
                 5  |   6.206478    1.34334     4.62   0.000     3.573581    8.839375
                 6  |   5.625989   1.053385     5.34   0.000     3.561393    7.690586
                 7  |   6.333357    1.47118     4.30   0.000     3.449896    9.216818
-------------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.

. margins, at(time=(2(1)7)) by(tx) 
warning: cannot perform check for estimable functions.

Predictive margins                                       Number of obs = 4,711
Model VCE: Robust

Expression: twopm combined expected values, predict()
Over:       tx
1._at: 0.tx
           time = 2
       1.tx
           time = 2
2._at: 0.tx
           time = 3
       1.tx
           time = 3
3._at: 0.tx
           time = 4
       1.tx
           time = 4
4._at: 0.tx
           time = 5
       1.tx
           time = 5
5._at: 0.tx
           time = 6
       1.tx
           time = 6
6._at: 0.tx
           time = 7
       1.tx
           time = 7

-----------------------------------------------------------------------------------------------------
                                    |            Delta-method
                                    |     Margin   std. err.      z    P>|z|     [95% conf. interval]
------------------------------------+----------------------------------------------------------------
                             _at#tx |
1#Receiving Standard Facility Care  |   3.295717   .8542376     3.86   0.000     1.621442    4.969992
              1#Receiving ICB Care  |   5.426988   1.496471     3.63   0.000     2.493958    8.360018
2#Receiving Standard Facility Care  |    4.41851   1.038194     4.26   0.000     2.383688    6.453331
              2#Receiving ICB Care  |   5.659148   .9580666     5.91   0.000     3.781371    7.536924
3#Receiving Standard Facility Care  |   3.802171   .6136885     6.20   0.000     2.599363    5.004978
              3#Receiving ICB Care  |   8.631655   2.518309     3.43   0.001      3.69586    13.56745
4#Receiving Standard Facility Care  |   3.443475   .5690444     6.05   0.000     2.328168    4.558781
              4#Receiving ICB Care  |   8.833522   2.557553     3.45   0.001      3.82081    13.84623
5#Receiving Standard Facility Care  |    3.97588   .9639781     4.12   0.000     2.086518    5.865242
              5#Receiving ICB Care  |   7.200357   1.835489     3.92   0.000     3.602866    10.79785
6#Receiving Standard Facility Care  |   4.522084   1.618677     2.79   0.005     1.349536    7.694632
              6#Receiving ICB Care  |   8.060168    2.41913     3.33   0.001     3.318761    12.80158
-----------------------------------------------------------------------------------------------------

. marginsplot //<--FIGURE 1

Variables that uniquely identify margins: time tx

. esttab atpm using "$sourcedir\tables2.csv", replace se starl( * 0.10 ** 0.05 *** 0.010) varwidth(25) label  interaction(" X ") title(Table 2: Pooled Regression Analysis) legend varlabels(_cons constant) stats(r2 df_r bic, fmt(3 0 1) label(R-sqr dfres BI
> C))
(output written to P:\Omar Projects\Harambee R01\Aim 3\SSM Manuscript - Analysis of GISHE Performance\Source\tables2.csv)

. 
. *adjusted
. twopm total_shares_purchased_usd tx##time $xlist if time!=. , firstpart(probit) secondpart(glm, family(gamma) link(log)) re vce(cluster study_group_id) 

Fitting probit regression for first part:

Iteration 0:  Log pseudolikelihood = -1744.1916  
Iteration 1:  Log pseudolikelihood = -1445.5606  
Iteration 2:  Log pseudolikelihood = -1427.5882  
Iteration 3:  Log pseudolikelihood = -1426.4672  
Iteration 4:  Log pseudolikelihood = -1426.4631  
Iteration 5:  Log pseudolikelihood = -1426.4631  (backed up)
Iteration 6:  Log pseudolikelihood = -1426.4631  (backed up)
Iteration 7:  Log pseudolikelihood = -1426.4631  (backed up)
Iteration 8:  Log pseudolikelihood = -1426.4631  (backed up)
Iteration 9:  Log pseudolikelihood = -1426.4631  (backed up)
Iteration 10: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 11: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 12: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 13: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 14: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 15: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 16: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 17: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 18: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 19: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 20: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 21: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 22: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 23: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 24: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 25: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 26: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 27: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 28: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 29: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 30: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 31: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 32: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 33: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 34: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 35: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 36: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 37: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 38: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 39: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 40: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 41: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 42: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 43: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 44: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 45: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 46: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 47: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 48: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 49: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 50: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 51: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 52: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 53: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 54: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 55: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 56: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 57: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 58: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 59: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 60: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 61: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 62: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 63: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 64: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 65: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 66: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 67: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 68: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 69: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 70: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 71: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 72: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 73: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 74: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 75: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 76: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 77: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 78: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 79: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 80: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 81: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 82: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 83: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 84: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 85: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 86: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 87: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 88: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 89: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 90: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 91: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 92: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 93: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 94: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 95: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 96: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 97: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 98: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 99: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 100: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 101: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 102: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 103: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 104: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 105: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 106: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 107: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 108: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 109: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 110: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 111: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 112: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 113: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 114: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 115: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 116: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 117: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 118: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 119: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 120: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 121: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 122: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 123: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 124: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 125: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 126: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 127: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 128: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 129: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 130: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 131: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 132: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 133: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 134: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 135: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 136: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 137: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 138: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 139: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 140: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 141: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 142: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 143: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 144: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 145: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 146: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 147: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 148: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 149: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 150: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 151: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 152: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 153: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 154: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 155: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 156: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 157: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 158: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 159: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 160: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 161: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 162: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 163: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 164: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 165: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 166: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 167: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 168: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 169: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 170: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 171: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 172: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 173: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 174: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 175: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 176: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 177: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 178: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 179: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 180: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 181: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 182: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 183: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 184: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 185: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 186: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 187: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 188: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 189: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 190: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 191: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 192: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 193: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 194: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 195: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 196: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 197: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 198: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 199: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 200: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 201: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 202: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 203: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 204: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 205: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 206: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 207: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 208: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 209: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 210: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 211: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 212: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 213: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 214: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 215: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 216: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 217: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 218: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 219: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 220: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 221: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 222: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 223: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 224: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 225: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 226: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 227: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 228: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 229: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 230: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 231: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 232: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 233: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 234: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 235: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 236: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 237: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 238: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 239: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 240: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 241: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 242: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 243: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 244: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 245: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 246: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 247: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 248: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 249: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 250: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 251: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 252: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 253: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 254: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 255: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 256: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 257: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 258: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 259: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 260: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 261: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 262: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 263: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 264: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 265: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 266: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 267: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 268: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 269: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 270: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 271: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 272: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 273: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 274: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 275: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 276: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 277: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 278: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 279: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 280: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 281: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 282: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 283: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 284: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 285: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 286: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 287: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 288: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 289: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 290: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 291: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 292: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 293: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 294: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 295: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 296: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 297: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 298: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 299: Log pseudolikelihood = -1426.4631  (backed up)
Iteration 300: Log pseudolikelihood = -1426.4631  (backed up)
convergence not achieved

Fitting glm regression for second part:

Iteration 0:  Log pseudolikelihood = -8095.9437  
Iteration 1:  Log pseudolikelihood = -7953.8242  
Iteration 2:  Log pseudolikelihood = -7952.5621  
Iteration 3:  Log pseudolikelihood = -7952.5613  

Two-part model
------------------------------------------------------------------------------
Log pseudolikelihood = -9379.0244                 Number of obs   =       3685

Part 1: probit
------------------------------------------------------------------------------
                                                  Number of obs   =       3685
                                                  Wald chi2(20)   =     138.85
                                                  Prob > chi2     =     0.0000
Log pseudolikelihood = -1426.4631                 Pseudo R2       =     0.1822

Part 2: glm
------------------------------------------------------------------------------
                                                   Number of obs   =      3017
Deviance         =  2765.804264                    (1/df) Deviance =  .9231656
Pearson          =  4879.747245                    (1/df) Pearson  =  1.628754

Variance function: V(u) = u^2                      [Gamma]
Link function    : g(u) = ln(u)                    [Log]

                                                   AIC             =  5.285755
Log pseudolikelihood = -7952.561342                BIC             =  -21238.2
                                   (Std. err. adjusted for 57 clusters in study_group_id)
-----------------------------------------------------------------------------------------
                        |               Robust
total_shares_purchas~sd | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
------------------------+----------------------------------------------------------------
probit                  |
                     tx |
    Receiving ICB Care  |   .3934395   .2457362     1.60   0.109    -.0881946    .8750736
                        |
                   time |
                     3  |   .8673923   .1767159     4.91   0.000     .5210356    1.213749
                     4  |   .7068749   .2192707     3.22   0.001     .2771123    1.136638
                     5  |    .401922   .2684831     1.50   0.134    -.1242951    .9281392
                     6  |   .1898917   .2229926     0.85   0.394    -.2471657    .6269492
                     7  |   .1958458   .2908822     0.67   0.501    -.3742728    .7659644
                        |
                tx#time |
  Receiving ICB Care#3  |  -.1939164   .2498215    -0.78   0.438    -.6835575    .2957248
  Receiving ICB Care#4  |  -.6351355   .3165442    -2.01   0.045    -1.255551   -.0147203
  Receiving ICB Care#5  |  -.4710591   .4396504    -1.07   0.284    -1.332758    .3906399
  Receiving ICB Care#6  |  -.3700709    .324329    -1.14   0.254    -1.005744    .2656022
  Receiving ICB Care#7  |  -.3806714   .3817635    -1.00   0.319    -1.128914    .3675713
                        |
                    age |   .0053993   .0034264     1.58   0.115    -.0013164     .012115
                        |
             female_bin |
                     1  |    .261986   .0791765     3.31   0.001      .106803    .4171691
                        |
               educ_bin |
                   Yes  |   .0809611   .1203341     0.67   0.501    -.1548894    .3168115
                        |
             income_bin |
 >=5,000 KSH ($50 USD)  |  -.0465271   .0668719    -0.70   0.487    -.1775937    .0845394
                        |
           gishe_months |   .0002286   .0008352     0.27   0.784    -.0014083    .0018655
      WalkingDistancekm |  -.0037695   .0035086    -1.07   0.283    -.0106462    .0031072
no_of_meetings_attended |   .2428503    .045724     5.31   0.000     .1532329    .3324677
     group_active_total |  -.0141388   .0111209    -1.27   0.204    -.0359353    .0076578
           meeting_freq |   .3265019   .1080776     3.02   0.003     .1146736    .5383301
                  _cons |   -1.14715   .3425346    -3.35   0.001    -1.818505   -.4757942
------------------------+----------------------------------------------------------------
glm                     |
                     tx |
    Receiving ICB Care  |   .3843694   .2685832     1.43   0.152     -.142044    .9107827
                        |
                   time |
                     3  |   .0475103    .175056     0.27   0.786    -.2955931    .3906138
                     4  |  -.0142955   .1537313    -0.09   0.926    -.3156033    .2870122
                     5  |   .0013231   .1767624     0.01   0.994    -.3451249    .3477711
                     6  |   .1812784   .1507879     1.20   0.229    -.1142604    .4768172
                     7  |   .1432741   .1747228     0.82   0.412    -.1991762    .4857245
                        |
                tx#time |
  Receiving ICB Care#3  |  -.0625262   .2191318    -0.29   0.775    -.4920167    .3669643
  Receiving ICB Care#4  |   .1452917   .1910266     0.76   0.447    -.2291137     .519697
  Receiving ICB Care#5  |   .1779647   .2561843     0.69   0.487    -.3241473    .6800767
  Receiving ICB Care#6  |   -.182763   .2093383    -0.87   0.383    -.5930585    .2275326
  Receiving ICB Care#7  |   .1223744   .2743932     0.45   0.656    -.4154265    .6601752
                        |
                    age |  -.0006695   .0033746    -0.20   0.843    -.0072835    .0059445
                        |
             female_bin |
                     1  |   .1084376   .0923227     1.17   0.240    -.0725116    .2893868
                        |
               educ_bin |
                   Yes  |   .2948727   .0902795     3.27   0.001     .1179282    .4718172
                        |
             income_bin |
 >=5,000 KSH ($50 USD)  |   .1152576   .0658995     1.75   0.080     -.013903    .2444182
                        |
           gishe_months |   .0023098   .0011056     2.09   0.037     .0001428    .0044768
      WalkingDistancekm |   .0063638   .0061475     1.04   0.301     -.005685    .0184126
no_of_meetings_attended |   .1669863   .0202405     8.25   0.000     .1273156     .206657
     group_active_total |   .0400556   .0162418     2.47   0.014     .0082222     .071889
           meeting_freq |  -.2772894   .1196725    -2.32   0.020    -.5118431   -.0427356
                  _cons |   .1983934   .4223266     0.47   0.639    -.6293515    1.026138
-----------------------------------------------------------------------------------------

. estimates store atpm

. margins if tx==0
warning: cannot perform check for estimable functions.

Predictive margins                                       Number of obs = 1,874
Model VCE: Robust

Expression: twopm combined expected values, predict()

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
       _cons |   4.368079   .7181016     6.08   0.000     2.960625    5.775532
------------------------------------------------------------------------------

. margins if tx==1
warning: cannot perform check for estimable functions.

Predictive margins                                       Number of obs = 1,811
Model VCE: Robust

Expression: twopm combined expected values, predict()

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
       _cons |   7.648095   1.279652     5.98   0.000     5.140023    10.15617
------------------------------------------------------------------------------

. margins, dydx(tx) 
warning: cannot perform check for estimable functions.

Average marginal effects                                 Number of obs = 3,685
Model VCE: Robust

Expression: twopm combined expected values, predict()
dy/dx wrt:  1.tx

-------------------------------------------------------------------------------------
                    |            Delta-method
                    |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
--------------------+----------------------------------------------------------------
                 tx |
Receiving ICB Care  |   2.526499   1.255247     2.01   0.044     .0662594    4.986738
-------------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.

. margins, dydx(*) 
warning: cannot perform check for estimable functions.

Average marginal effects                                 Number of obs = 3,685
Model VCE: Robust

Expression: twopm combined expected values, predict()
dy/dx wrt:  1.tx 3.time 4.time 5.time 6.time 7.time age 1.female_bin 1.educ_bin 1.income_bin gishe_months WalkingDistancekm no_of_meetings_attended group_active_total meeting_freq

-----------------------------------------------------------------------------------------
                        |            Delta-method
                        |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
------------------------+----------------------------------------------------------------
                     tx |
    Receiving ICB Care  |   2.526499   1.255247     2.01   0.044     .0662594    4.986738
                        |
                   time |
                     3  |   .6545738    .676727     0.97   0.333    -.6717867    1.980934
                     4  |   .7960408   .7080006     1.12   0.261    -.5916149    2.183696
                     5  |   .8259786   .8450793     0.98   0.328    -.8303464    2.482304
                     6  |   .4003327    .691586     0.58   0.563    -.9551509    1.755816
                     7  |    1.31485   1.025262     1.28   0.200    -.6946258    3.324326
                        |
                    age |    .001393   .0203914     0.07   0.946    -.0385734    .0413595
           1.female_bin |   .8923004   .5270289     1.69   0.090    -.1406573    1.925258
                        |
               educ_bin |
                   Yes  |   2.003914    .740407     2.71   0.007     .5527427    3.455085
                        |
             income_bin |
 >=5,000 KSH ($50 USD)  |   .6307519   .4130733     1.53   0.127    -.1788569    1.440361
           gishe_months |   .0140411   .0074635     1.88   0.060     -.000587    .0286693
      WalkingDistancekm |   .0342881   .0382383     0.90   0.370    -.0406576    .1092338
no_of_meetings_attended |   1.241318   .2073685     5.99   0.000     .8348836    1.647753
     group_active_total |   .2254025   .1107291     2.04   0.042     .0083775    .4424274
           meeting_freq |  -1.331861   .8671334    -1.54   0.125    -3.031411    .3676896
-----------------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.

. //2.526499, 0.044
. margins, at(time=(2(1)7)) by(tx) 
warning: cannot perform check for estimable functions.

Predictive margins                                       Number of obs = 3,685
Model VCE: Robust

Expression: twopm combined expected values, predict()
Over:       tx
1._at: 0.tx
           time = 2
       1.tx
           time = 2
2._at: 0.tx
           time = 3
       1.tx
           time = 3
3._at: 0.tx
           time = 4
       1.tx
           time = 4
4._at: 0.tx
           time = 5
       1.tx
           time = 5
5._at: 0.tx
           time = 6
       1.tx
           time = 6
6._at: 0.tx
           time = 7
       1.tx
           time = 7

-----------------------------------------------------------------------------------------------------
                                    |            Delta-method
                                    |     Margin   std. err.      z    P>|z|     [95% conf. interval]
------------------------------------+----------------------------------------------------------------
                             _at#tx |
1#Receiving Standard Facility Care  |   3.757648   .8458085     4.44   0.000     2.099894    5.415402
              1#Receiving ICB Care  |   6.883747   1.629735     4.22   0.000     3.689525    10.07797
2#Receiving Standard Facility Care  |   4.686189   1.002861     4.67   0.000     2.720617     6.65176
              2#Receiving ICB Care  |   7.254823   1.252236     5.79   0.000     4.800487     9.70916
3#Receiving Standard Facility Care  |     4.3146   .7113562     6.07   0.000     2.920368    5.708833
              3#Receiving ICB Care  |   7.927194   1.579381     5.02   0.000     4.831665    11.02272
4#Receiving Standard Facility Care  |    4.15916   .7148436     5.82   0.000     2.758092    5.560227
              4#Receiving ICB Care  |   8.148959   1.526659     5.34   0.000     5.156763    11.14115
5#Receiving Standard Facility Care  |   4.746033   1.073814     4.42   0.000     2.641396     6.85067
              5#Receiving ICB Care  |   6.675571   1.332282     5.01   0.000     4.064346    9.286796
6#Receiving Standard Facility Care  |   4.575865   1.047891     4.37   0.000     2.522036    6.629693
              6#Receiving ICB Care  |   8.712508   1.861132     4.68   0.000     5.064755    12.36026
-----------------------------------------------------------------------------------------------------

. marginsplot

Variables that uniquely identify margins: time tx

. esttab atpm using "$sourcedir\tables2.csv", replace se starl( * 0.10 ** 0.05 *** 0.010) varwidth(25) label  interaction(" X ") title(Table 2: Pooled Regression Analysis) legend varlabels(_cons constant) stats(r2 df_r bic, fmt(3 0 1) label(R-sqr dfres BI
> C))
(output written to P:\Omar Projects\Harambee R01\Aim 3\SSM Manuscript - Analysis of GISHE Performance\Source\tables2.csv)

. 
. esttab atpm using "$sourcedir\tables2b.csv", replace ci starl( * 0.10 ** 0.05 *** 0.010) varwidth(25) label  interaction(" X ") title(Table 2: Pooled Regression Analysis) legend varlabels(_cons constant) stats(r2 df_r bic, fmt(3 0 1) label(R-sqr dfres B
> IC))
(output written to P:\Omar Projects\Harambee R01\Aim 3\SSM Manuscript - Analysis of GISHE Performance\Source\tables2b.csv)

. 
. 
.                 
.                 
. ****negative binomial model for outcome: defaulted since last encounter
. global xlist age i.female_bin i.educ_bin i.income_bin gishe_months no_of_meetings_attended WalkingDistancekm group_active_total meeting_freq loan_bal_outstanding 

. 
. gen loanbal_yn = 1 if loan_bal_outstanding >0 & loan_bal_outstanding !=. 
(3,135 missing values generated)

. replace loanbal_yn = 0 if loanbal_yn!=1
(3,135 real changes made)

. 
. glm defaulted_since_last_encounter i.tx##i.time  $xlist if time!=1 & loan_bal_outstanding >0, family(nbinomial) link(log) vce(cluster study_group_id) 

Iteration 0:  Log pseudolikelihood =   -752.132  
Iteration 1:  Log pseudolikelihood = -747.60573  
Iteration 2:  Log pseudolikelihood =  -747.5864  
Iteration 3:  Log pseudolikelihood = -747.58639  

Generalized linear models                         Number of obs   =      1,759
Optimization     : ML                             Residual df     =      1,737
                                                  Scale parameter =          1
Deviance         =   716.075358                   (1/df) Deviance =   .4122483
Pearson          =  1374.667461                   (1/df) Pearson  =   .7914033

Variance function: V(u) = u+(1)u^2                [Neg. Binomial]
Link function    : g(u) = ln(u)                   [Log]

                                                  AIC             =   .8750272
Log pseudolikelihood = -747.5863945               BIC             =  -12263.66

                                          (Std. err. adjusted for 52 clusters in study_group_id)
------------------------------------------------------------------------------------------------
                               |               Robust
defaulted_since_last_encounter | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------------------------+----------------------------------------------------------------
                            tx |
           Receiving ICB Care  |   1.353044   .7834553     1.73   0.084    -.1825003    2.888588
                               |
                          time |
                            3  |   .7504631   .6134196     1.22   0.221    -.4518173    1.952743
                            4  |   .7680944   .7956812     0.97   0.334    -.7914122    2.327601
                            5  |   1.633998   .7155891     2.28   0.022     .2314695    3.036527
                            6  |   2.363129   .5369274     4.40   0.000     1.310771    3.415488
                            7  |   1.916659   .6426526     2.98   0.003     .6570836    3.176235
                               |
                       tx#time |
         Receiving ICB Care#3  |  -.4253661    .838413    -0.51   0.612    -2.068625    1.217893
         Receiving ICB Care#4  |  -1.076686   .9825999    -1.10   0.273    -3.002546    .8491744
         Receiving ICB Care#5  |  -1.137744   .9370626    -1.21   0.225    -2.974353    .6988648
         Receiving ICB Care#6  |  -1.531691     .70748    -2.16   0.030    -2.918327    -.145056
         Receiving ICB Care#7  |  -1.875628    .864623    -2.17   0.030    -3.570258   -.1809978
                               |
                           age |  -.0159451   .0064363    -2.48   0.013      -.02856   -.0033301
                  1.female_bin |  -.3791554   .1357575    -2.79   0.005    -.6452352   -.1130757
                               |
                      educ_bin |
                          Yes  |  -.1290431   .1926554    -0.67   0.503    -.5066407    .2485544
                               |
                    income_bin |
        >=5,000 KSH ($50 USD)  |  -.2274312   .1444258    -1.57   0.115    -.5105006    .0556382
                  gishe_months |   .0012178   .0010753     1.13   0.257    -.0008898    .0033254
       no_of_meetings_attended |  -.1525316   .0299357    -5.10   0.000    -.2112045   -.0938588
             WalkingDistancekm |   .0014027   .0054884     0.26   0.798    -.0093545    .0121598
            group_active_total |   .0030458   .0165851     0.18   0.854    -.0294605     .035552
                  meeting_freq |  -.3992574   .1830697    -2.18   0.029    -.7580673   -.0404474
          loan_bal_outstanding |  -.0000129   .0000388    -0.33   0.740    -.0000889    .0000631
                         _cons |  -.8917192   .7515116    -1.19   0.235    -2.364655    .5812165
------------------------------------------------------------------------------------------------

. glm defaulted_since_last_encounter i.tx##i.time  $xlist if time!=1 & loan_bal_outstanding >0, family(nbinomial) link(log) vce(cluster study_group_id) eform

Iteration 0:  Log pseudolikelihood =   -752.132  
Iteration 1:  Log pseudolikelihood = -747.60573  
Iteration 2:  Log pseudolikelihood =  -747.5864  
Iteration 3:  Log pseudolikelihood = -747.58639  

Generalized linear models                         Number of obs   =      1,759
Optimization     : ML                             Residual df     =      1,737
                                                  Scale parameter =          1
Deviance         =   716.075358                   (1/df) Deviance =   .4122483
Pearson          =  1374.667461                   (1/df) Pearson  =   .7914033

Variance function: V(u) = u+(1)u^2                [Neg. Binomial]
Link function    : g(u) = ln(u)                   [Log]

                                                  AIC             =   .8750272
Log pseudolikelihood = -747.5863945               BIC             =  -12263.66

                                          (Std. err. adjusted for 52 clusters in study_group_id)
------------------------------------------------------------------------------------------------
                               |               Robust
defaulted_since_last_encounter |        IRR   std. err.      z    P>|z|     [95% conf. interval]
-------------------------------+----------------------------------------------------------------
                            tx |
           Receiving ICB Care  |   3.869184   3.031333     1.73   0.084     .8331844    17.96792
                               |
                          time |
                            3  |   2.117981   1.299211     1.22   0.221     .6364705    7.047997
                            4  |   2.155655   1.715214     0.97   0.334     .4532043    10.25331
                            5  |   5.124323    3.66691     2.28   0.022     1.260451    20.83277
                            6  |   10.62415   5.704395     4.40   0.000     3.709033    30.43179
                            7  |   6.798211   4.368887     2.98   0.003     1.929158     23.9564
                               |
                       tx#time |
         Receiving ICB Care#3  |   .6535305   .5479284    -0.51   0.612     .1263594    3.380059
         Receiving ICB Care#4  |   .3407228   .3347942    -1.10   0.273     .0496605    2.337716
         Receiving ICB Care#5  |   .3205413   .3003673    -1.21   0.225     .0510805    2.011468
         Receiving ICB Care#6  |   .2161697   .1529358    -2.16   0.030      .054024    .8649738
         Receiving ICB Care#7  |   .1532587    .132511    -2.17   0.030     .0281486    .8344372
                               |
                           age |   .9841814   .0063345    -2.48   0.013     .9718439    .9966755
                  1.female_bin |   .6844392   .0929177    -2.79   0.005     .5245392    .8930831
                               |
                      educ_bin |
                          Yes  |    .878936   .1693317    -0.67   0.503     .6025162    1.282171
                               |
                    income_bin |
        >=5,000 KSH ($50 USD)  |   .7965772   .1150463    -1.57   0.115      .600195    1.057215
                  gishe_months |   1.001219   .0010766     1.13   0.257     .9991106    1.003331
       no_of_meetings_attended |   .8585317   .0257007    -5.10   0.000     .8096085    .9104113
             WalkingDistancekm |   1.001404   .0054961     0.26   0.798     .9906891    1.012234
            group_active_total |    1.00305   .0166357     0.18   0.854     .9709693    1.036192
                  meeting_freq |    .670818   .1228064    -2.18   0.029     .4685712    .9603597
          loan_bal_outstanding |   .9999871   .0000388    -0.33   0.740     .9999111    1.000063
                         _cons |   .4099504   .3080825    -1.19   0.235     .0939817    1.788213
------------------------------------------------------------------------------------------------
Note: _cons estimates baseline incidence rate.

. estimates store A 

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |          N   ll(null)  ll(model)      df        AIC        BIC
-------------+---------------------------------------------------------------
           A |      1,759          .  -747.5864      22   1539.173   1659.568
-----------------------------------------------------------------------------
Note: BIC uses N = number of observations. See [R] IC note.

. outreg2 using supTableone.doc, addstat(Log-likelihood,`e(ll)', parameters, `e(k)')  ctitle(NBR_all)
supTableone.doc
dir : seeout

. 
.         **FIGURE 2. 
.         local coefinter 1.tx 1.tx#2.time 1.tx#3.time 1.tx#4.time 1.tx#5.time 1.tx#6.time 1.tx#7.time

.         coefplot        (A, label(Tx=1, all) pstyle(p3)), ///
>                                 drop(_cons) keep(`coefinter') xline(0) 

.                                 
.         local coefinter 1.tx 1.tx#2.time 1.tx#3.time 1.tx#4.time 1.tx#5.time 1.tx#6.time 1.tx#7.time

.         coefplot        (A, label(Tx=1, all) pstyle(p3)), ///
>                                 drop(_cons) keep(`coefinter') xline(1) eform xtitle(Incidence Rate Ratio) 

. 
. **Supplementary Table 4. 
. *stratify by income     
. glm defaulted_since_last_encounter tx##time $xlist if income_bin==1 & time!=1   , family(nbinomial) link(log) vce(cluster study_group_id)  
note: 1.income_bin omitted because of collinearity.

Iteration 0:  Log pseudolikelihood = -453.54319  
Iteration 1:  Log pseudolikelihood = -447.61371  
Iteration 2:  Log pseudolikelihood = -447.53271  
Iteration 3:  Log pseudolikelihood = -447.53241  
Iteration 4:  Log pseudolikelihood = -447.53241  

Generalized linear models                         Number of obs   =      1,244
Optimization     : ML                             Residual df     =      1,223
                                                  Scale parameter =          1
Deviance         =  443.1328486                   (1/df) Deviance =   .3623327
Pearson          =  1844.947438                   (1/df) Pearson  =   1.508542

Variance function: V(u) = u+(1)u^2                [Neg. Binomial]
Link function    : g(u) = ln(u)                   [Log]

                                                  AIC             =   .7532675
Log pseudolikelihood = -447.5324051               BIC             =  -8272.072

                                          (Std. err. adjusted for 56 clusters in study_group_id)
------------------------------------------------------------------------------------------------
                               |               Robust
defaulted_since_last_encounter | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------------------------+----------------------------------------------------------------
                            tx |
           Receiving ICB Care  |  -.0466472   1.453352    -0.03   0.974    -2.895165    2.801871
                               |
                          time |
                            3  |   1.339411   1.135391     1.18   0.238    -.8859146    3.564736
                            4  |   1.353949   1.158244     1.17   0.242    -.9161673    3.624065
                            5  |   1.959696   1.070057     1.83   0.067    -.1375769    4.056969
                            6  |   2.754033   1.047372     2.63   0.009     .7012216    4.806844
                            7  |   2.319794   1.076692     2.15   0.031     .2095162    4.430071
                               |
                       tx#time |
         Receiving ICB Care#3  |   .8196432   1.580519     0.52   0.604    -2.278117    3.917404
         Receiving ICB Care#4  |   .3768333   1.600309     0.24   0.814    -2.759715    3.513382
         Receiving ICB Care#5  |   .3432419   1.543985     0.22   0.824    -2.682914    3.369398
         Receiving ICB Care#6  |   .1605929   1.535884     0.10   0.917    -2.849684     3.17087
         Receiving ICB Care#7  |  -.4119638    1.51323    -0.27   0.785     -3.37784    2.553913
                               |
                           age |  -.0184382   .0084975    -2.17   0.030    -.0350931   -.0017834
                  1.female_bin |  -.4017503   .1636832    -2.45   0.014    -.7225635   -.0809371
                               |
                      educ_bin |
                          Yes  |  -.0963219   .2459384    -0.39   0.695    -.5783524    .3857085
                               |
                    income_bin |
        >=5,000 KSH ($50 USD)  |          0  (omitted)
                  gishe_months |   .0019009   .0013979     1.36   0.174     -.000839    .0046408
       no_of_meetings_attended |  -.2087639   .0420971    -4.96   0.000    -.2912726   -.1262552
             WalkingDistancekm |  -.0058896   .0066824    -0.88   0.378    -.0189868    .0072076
            group_active_total |  -.0001019   .0235763    -0.00   0.997    -.0463107    .0461068
                  meeting_freq |  -.4822789   .2166104    -2.23   0.026    -.9068274   -.0577303
          loan_bal_outstanding |   .0000184   .0000357     0.52   0.605    -.0000514    .0000883
                         _cons |    -1.0914   1.241627    -0.88   0.379    -3.524944    1.342143
------------------------------------------------------------------------------------------------

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |          N   ll(null)  ll(model)      df        AIC        BIC
-------------+---------------------------------------------------------------
           . |      1,244          .  -447.5324      21   937.0648   1044.713
-----------------------------------------------------------------------------
Note: BIC uses N = number of observations. See [R] IC note.

. estimates store B

. outreg2 using supTableone.doc,  addstat(Log-likelihood,`e(ll)', parameters, `e(k)') append ctitle(income>=50USD per month)
supTableone.doc
dir : seeout

. 
. glm defaulted_since_last_encounter tx##time $xlist if income_bin==0 & time!=1  , family(nbinomial) link(log) vce(cluster study_group_id)   
note: 0.income_bin omitted because of collinearity.

Iteration 0:  Log pseudolikelihood = -313.71409  
Iteration 1:  Log pseudolikelihood = -312.17175  
Iteration 2:  Log pseudolikelihood =  -312.1646  
Iteration 3:  Log pseudolikelihood =  -312.1646  

Generalized linear models                         Number of obs   =        700
Optimization     : ML                             Residual df     =        679
                                                  Scale parameter =          1
Deviance         =  291.6185609                   (1/df) Deviance =   .4294824
Pearson          =  510.0437649                   (1/df) Pearson  =    .751169

Variance function: V(u) = u+(1)u^2                [Neg. Binomial]
Link function    : g(u) = ln(u)                   [Log]

                                                  AIC             =   .9518989
Log pseudolikelihood = -312.1646038               BIC             =  -4156.565

                                                (Std. err. adjusted for 54 clusters in study_group_id)
------------------------------------------------------------------------------------------------------
                                     |               Robust
      defaulted_since_last_encounter | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------------------------------+----------------------------------------------------------------
                                  tx |
                 Receiving ICB Care  |   1.198088   .8270525     1.45   0.147    -.4229051    2.819081
                                     |
                                time |
                                  3  |   .0667782   .6615805     0.10   0.920    -1.229896    1.363452
                                  4  |   -.027198   1.001632    -0.03   0.978     -1.99036    1.935964
                                  5  |   1.190503   .8539099     1.39   0.163    -.4831299    2.864135
                                  6  |   1.930019   .7194796     2.68   0.007     .5198646    3.340173
                                  7  |   1.604641   .8022487     2.00   0.045     .0322627     3.17702
                                     |
                             tx#time |
               Receiving ICB Care#3  |  -.2283164    .840743    -0.27   0.786    -1.876142    1.419509
               Receiving ICB Care#4  |  -1.447938   1.230995    -1.18   0.240    -3.860644    .9647684
               Receiving ICB Care#5  |  -1.025236   1.016143    -1.01   0.313    -3.016839    .9663676
               Receiving ICB Care#6  |  -1.847984   .9294417    -1.99   0.047    -3.669656    -.026312
               Receiving ICB Care#7  |  -2.017421   1.054868    -1.91   0.056    -4.084924    .0500813
                                     |
                                 age |  -.0157587   .0070922    -2.22   0.026    -.0296592   -.0018583
                        1.female_bin |  -.3701343   .1795142    -2.06   0.039    -.7219757   -.0182929
                                     |
                            educ_bin |
                                Yes  |  -.0887869   .1800966    -0.49   0.622    -.4417697    .2641958
                                     |
                          income_bin |
<5,000 KES or N/A/Don't Know/Refuse  |          0  (omitted)
                        gishe_months |   .0007918   .0013532     0.59   0.558    -.0018603     .003444
             no_of_meetings_attended |  -.0996134   .0366793    -2.72   0.007    -.1715035   -.0277234
                   WalkingDistancekm |   .0073587   .0064002     1.15   0.250    -.0051854    .0199028
                  group_active_total |  -.0017335    .018675    -0.09   0.926    -.0383358    .0348688
                        meeting_freq |  -.2995028   .1632745    -1.83   0.067     -.619515    .0205095
                loan_bal_outstanding |  -.0000217   .0000323    -0.67   0.502    -.0000849    .0000416
                               _cons |  -.7988428   .9502017    -0.84   0.401    -2.661204    1.063518
------------------------------------------------------------------------------------------------------

. estimates store C 

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |          N   ll(null)  ll(model)      df        AIC        BIC
-------------+---------------------------------------------------------------
           C |        700          .  -312.1646      21   666.3292   761.9019
-----------------------------------------------------------------------------
Note: BIC uses N = number of observations. See [R] IC note.

. outreg2 using supTableone.doc,  addstat(Log-likelihood,`e(ll)', parameters, `e(k)') append ctitle(income<50USD per month) 
supTableone.doc
dir : seeout

. 
. *stratify by distance   
. capture drop distance_bin

. gen distance_bin=1 if DrivingDistancekm>20
(4,115 missing values generated)

. replace distance_bin=0 if DrivingDistancekm<=20
(4,115 real changes made)

. 
. glm defaulted_since_last_encounter tx##time $xlist if distance_bin==1 & time!=1   , family(nbinomial) link(log) vce(cluster study_group_id)  

Iteration 0:  Log pseudolikelihood = -182.87914  
Iteration 1:  Log pseudolikelihood = -180.59527  
Iteration 2:  Log pseudolikelihood = -180.31333  
Iteration 3:  Log pseudolikelihood =  -180.2502  
Iteration 4:  Log pseudolikelihood = -180.23509  
Iteration 5:  Log pseudolikelihood = -180.23188  
Iteration 6:  Log pseudolikelihood = -180.23121  
Iteration 7:  Log pseudolikelihood = -180.23105  
Iteration 8:  Log pseudolikelihood = -180.23102  
Iteration 9:  Log pseudolikelihood = -180.23101  

Generalized linear models                         Number of obs   =        440
Optimization     : ML                             Residual df     =        430
                                                  Scale parameter =          1
Deviance         =  144.2000999                   (1/df) Deviance =   .3353491
Pearson          =  231.7875138                   (1/df) Pearson  =   .5390407

Variance function: V(u) = u+(1)u^2                [Neg. Binomial]
Link function    : g(u) = ln(u)                   [Log]

                                                  AIC             =   .8646864
Log pseudolikelihood = -180.2310101               BIC             =  -2473.113

                                          (Std. err. adjusted for 10 clusters in study_group_id)
------------------------------------------------------------------------------------------------
                               |               Robust
defaulted_since_last_encounter | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------------------------+----------------------------------------------------------------
                            tx |
           Receiving ICB Care  |      .9127    1.23596     0.74   0.460    -1.509737    3.335137
                               |
                          time |
                            3  |   .5654764   1.213266     0.47   0.641    -1.812481    2.943434
                            4  |   1.190249   1.154442     1.03   0.303    -1.072417    3.452914
                            5  |   1.913491   1.240933     1.54   0.123    -.5186937    4.345675
                            6  |   1.998256   .8528143     2.34   0.019     .3267703    3.669741
                            7  |   2.299965   1.019382     2.26   0.024     .3020131    4.297916
                               |
                       tx#time |
         Receiving ICB Care#3  |  -.5217525   1.512488    -0.34   0.730    -3.486174    2.442669
         Receiving ICB Care#4  |  -15.32534   1.316984   -11.64   0.000    -17.90658    -12.7441
         Receiving ICB Care#5  |  -2.758025   1.774603    -1.55   0.120    -6.236183    .7201332
         Receiving ICB Care#6  |  -.6196853   1.060141    -0.58   0.559    -2.697523    1.458153
         Receiving ICB Care#7  |  -3.386714   1.595033    -2.12   0.034    -6.512921   -.2605075
                               |
                           age |  -.0108054   .0102605    -1.05   0.292    -.0309156    .0093048
                  1.female_bin |  -.3420542   .2902479    -1.18   0.239    -.9109296    .2268211
                               |
                      educ_bin |
                          Yes  |   .2208619   .2083602     1.06   0.289    -.1875166    .6292405
                               |
                    income_bin |
        >=5,000 KSH ($50 USD)  |   -.524956   .2882732    -1.82   0.069    -1.089961    .0400491
                  gishe_months |   .0011596   .0006399     1.81   0.070    -.0000946    .0024137
       no_of_meetings_attended |  -.1210972   .0227884    -5.31   0.000    -.1657616   -.0764328
             WalkingDistancekm |   .0013601   .0072431     0.19   0.851     -.012836    .0155563
            group_active_total |   -.018209   .0306525    -0.59   0.552    -.0782868    .0418689
                  meeting_freq |  -.7169767   .1522328    -4.71   0.000    -1.015348   -.4186058
          loan_bal_outstanding |  -.0000617   .0000462    -1.34   0.182    -.0001521    .0000288
                         _cons |   .1247208   1.055895     0.12   0.906    -1.944795    2.194237
------------------------------------------------------------------------------------------------

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |          N   ll(null)  ll(model)      df        AIC        BIC
-------------+---------------------------------------------------------------
           . |        440          .   -180.231      10    380.462   421.3298
-----------------------------------------------------------------------------
Note: BIC uses N = number of observations. See [R] IC note.

. estimates store D

. outreg2 using supTableone.doc,  addstat(Log-likelihood,`e(ll)', parameters, `e(k)') append ctitle(NBR_fardistance)
supTableone.doc
dir : seeout

. 
. glm defaulted_since_last_encounter tx##time $xlist if distance_bin==0 & time!=1  , family(nbinomial) link(log) vce(cluster study_group_id)   

Iteration 0:  Log pseudolikelihood = -568.57838  
Iteration 1:  Log pseudolikelihood = -562.80437  
Iteration 2:  Log pseudolikelihood =  -562.7803  
Iteration 3:  Log pseudolikelihood = -562.78029  

Generalized linear models                         Number of obs   =      1,504
Optimization     : ML                             Residual df     =      1,482
                                                  Scale parameter =          1
Deviance         =  557.1798982                   (1/df) Deviance =   .3759648
Pearson          =  1539.626832                   (1/df) Pearson  =   1.038885

Variance function: V(u) = u+(1)u^2                [Neg. Binomial]
Link function    : g(u) = ln(u)                   [Log]

                                                  AIC             =   .7776334
Log pseudolikelihood = -562.7802932               BIC             =  -10284.96

                                          (Std. err. adjusted for 46 clusters in study_group_id)
------------------------------------------------------------------------------------------------
                               |               Robust
defaulted_since_last_encounter | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------------------------+----------------------------------------------------------------
                            tx |
           Receiving ICB Care  |   1.236205   .8779914     1.41   0.159    -.4846264    2.957037
                               |
                          time |
                            3  |   .7327423    .646424     1.13   0.257    -.5342254     1.99971
                            4  |   .0146694    .834878     0.02   0.986    -1.621661       1.651
                            5  |   1.294475   .7329308     1.77   0.077    -.1420428    2.730993
                            6  |   2.347263   .6089138     3.85   0.000     1.153814    3.540712
                            7  |   1.643073   .7460265     2.20   0.028      .180888    3.105258
                               |
                       tx#time |
         Receiving ICB Care#3  |  -.1322438   .9265786    -0.14   0.887    -1.948304    1.683817
         Receiving ICB Care#4  |  -.1249414   1.060899    -0.12   0.906    -2.204265    1.954382
         Receiving ICB Care#5  |  -.5212243   1.021833    -0.51   0.610    -2.523981    1.481532
         Receiving ICB Care#6  |  -1.360178   .8276033    -1.64   0.100    -2.982251    .2618949
         Receiving ICB Care#7  |  -1.235434   1.009776    -1.22   0.221    -3.214558    .7436905
                               |
                           age |  -.0161494   .0073374    -2.20   0.028    -.0305304   -.0017684
                  1.female_bin |  -.2802126   .1348703    -2.08   0.038    -.5445536   -.0158717
                               |
                      educ_bin |
                          Yes  |  -.3848679   .1978867    -1.94   0.052    -.7727188     .002983
                               |
                    income_bin |
        >=5,000 KSH ($50 USD)  |  -.1879402   .1345144    -1.40   0.162    -.4515837    .0757033
                  gishe_months |    .000275   .0016781     0.16   0.870     -.003014    .0035639
       no_of_meetings_attended |  -.1837226   .0433055    -4.24   0.000    -.2685999   -.0988453
             WalkingDistancekm |  -.0359344   .0248376    -1.45   0.148    -.0846151    .0127463
            group_active_total |  -.0166757   .0173202    -0.96   0.336    -.0506226    .0172713
                  meeting_freq |  -.1761566   .1972673    -0.89   0.372    -.5627934    .2104803
          loan_bal_outstanding |   .0000453   .0000254     1.78   0.074    -4.48e-06    .0000951
                         _cons |  -.9643311    .865021    -1.11   0.265    -2.659741     .731079
------------------------------------------------------------------------------------------------

. estimates store E 

. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |          N   ll(null)  ll(model)      df        AIC        BIC
-------------+---------------------------------------------------------------
           E |      1,504          .  -562.7803      22   1169.561    1286.51
-----------------------------------------------------------------------------
Note: BIC uses N = number of observations. See [R] IC note.

. outreg2 using supTableone.doc,  addstat(Log-likelihood,`e(ll)', parameters, `e(k)') append ctitle(NBR_closedistance) 
supTableone.doc
dir : seeout

. 
. **Supplementary Table 3. # of loan defaults at each time point, by arm
. tab defaulted_since_last_encounter time if time!=1 & loan_bal_outstanding >0, col               

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

defaulted_ |
since_last |                               time
_encounter |         2          3          4          5          6          7 |     Total
-----------+------------------------------------------------------------------+----------
         0 |       639        662        614        599        578        620 |     3,712 
           |     97.56      94.84      95.49      88.22      84.63      90.38 |     91.79 
-----------+------------------------------------------------------------------+----------
         1 |        16         36         29         80        105         66 |       332 
           |      2.44       5.16       4.51      11.78      15.37       9.62 |      8.21 
-----------+------------------------------------------------------------------+----------
     Total |       655        698        643        679        683        686 |     4,044 
           |    100.00     100.00     100.00     100.00     100.00     100.00 |    100.00 

. bysort arm: tab defaulted_since_last_encounter time if time!=1 & loan_bal_outstanding >0, col           

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-> arm = Community-based Care (Arm A)

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

defaulted_ |
since_last |                               time
_encounter |         2          3          4          5          6          7 |     Total
-----------+------------------------------------------------------------------+----------
         0 |       300        306        280        282        279        298 |     1,745 
           |     96.46      92.73      94.92      88.68      88.57      92.83 |     92.33 
-----------+------------------------------------------------------------------+----------
         1 |        11         24         15         36         36         23 |       145 
           |      3.54       7.27       5.08      11.32      11.43       7.17 |      7.67 
-----------+------------------------------------------------------------------+----------
     Total |       311        330        295        318        315        321 |     1,890 
           |    100.00     100.00     100.00     100.00     100.00     100.00 |    100.00 

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-> arm = Facility-based Care (Arm B)

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

defaulted_ |
since_last |                               time
_encounter |         2          3          4          5          6          7 |     Total
-----------+------------------------------------------------------------------+----------
         0 |       339        356        334        317        299        322 |     1,967 
           |     98.55      96.74      95.98      87.81      81.25      88.22 |     91.32 
-----------+------------------------------------------------------------------+----------
         1 |         5         12         14         44         69         43 |       187 
           |      1.45       3.26       4.02      12.19      18.75      11.78 |      8.68 
-----------+------------------------------------------------------------------+----------
     Total |       344        368        348        361        368        365 |     2,154 
           |    100.00     100.00     100.00     100.00     100.00     100.00 |    100.00 


.  
. ***for what purpose did individuals use their loan                              
. use "P:\Omar Projects\Harambee R01\Aim 3\SSM Manuscript - Analysis of GISHE Performance\Output\18MOSGishe_rev.dta", clear

. preserve        

. keep if time==2 & loanbal_yn==1
(4,931 observations deleted)

. table1_mc,      by(arm) /// 
>                         vars(           loan_purpose cat        )               nospace percent_n onecol missing total(before) test saving("$sourcedir\table S2a.xlsx",replace)

  +--------------------------------------------------------------------------------------------------------------------+
  | factor                                                                           N_T   N_1   N_2   m_T   m_1   m_2 |
  |--------------------------------------------------------------------------------------------------------------------|
  | For what purpose did this member use the borrowed funds during the last period   186    98    88     0     0     0 |
  +--------------------------------------------------------------------------------------------------------------------+
   N_ ... #records used below,   m_ ... #records not used
 
  +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  |                                                                                   Total        Community-based Care (Arm A)   Facility-based Care (Arm B)   Test         p-value |
  |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                   N=186        N=98                           N=88                                               |
  |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | For what purpose did this member use the borrowed funds during the last period                                                                              Chi-square    0.43   |
  |    To pay off other debts, including unpaid workers and outstanding GISHE loans   1.6% (3)     1.0% (1)                       2.3% (2)                                           |
  |    to buy farm inputs such as seeds, ox plough, farm land, seeds                  8.1% (15)    4.1% (4)                       12.5% (11)                                         |
  |    To pay school fees for children, and other school expenses (paper, uniforms)   27.4% (51)   28.6% (28)                     26.1% (23)                                         |
  |    To pay medical expenses(health insurance, medical fees, medications)           9.1% (17)    11.2% (11)                     6.8% (6)                                           |
  |    To trade and invest in small business                                          29.6% (55)   29.6% (29)                     29.5% (26)                                         |
  |    To repair shelter or homestead                                                 2.2% (4)     2.0% (2)                       2.3% (2)                                           |
  |    To buy clothing for self and family                                            1.6% (3)     2.0% (2)                       1.1% (1)                                           |
  |    Other purpose                                                                  5.9% (11)    7.1% (7)                       4.5% (4)                                           |
  |    To buy farm animals                                                            2.2% (4)     2.0% (2)                       2.3% (2)                                           |
  |    To buy household food                                                          6.5% (12)    7.1% (7)                       5.7% (5)                                           |
  |    Transportation expenses                                                        2.7% (5)     4.1% (4)                       1.1% (1)                                           |
  |    Missing                                                                        3.2% (6)     1.0% (1)                       5.7% (5)                                           |
  +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Data are presented as % (n).
 
file P:\Omar Projects\Harambee R01\Aim 3\SSM Manuscript - Analysis of GISHE Performance\\Source\table S2a.xlsx saved

. restore 

. 
. preserve        

. keep if time==7 & loanbal_yn==1
(4,773 observations deleted)

. table1_mc,      by(arm) /// 
>                         vars(           loan_purpose cat        )               nospace percent_n onecol missing total(before) test saving("$sourcedir\table S2b.xlsx",replace)

  +--------------------------------------------------------------------------------------------------------------------+
  | factor                                                                           N_T   N_1   N_2   m_T   m_1   m_2 |
  |--------------------------------------------------------------------------------------------------------------------|
  | For what purpose did this member use the borrowed funds during the last period   344   180   164     0     0     0 |
  +--------------------------------------------------------------------------------------------------------------------+
   N_ ... #records used below,   m_ ... #records not used
 
  +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  |                                                                                   Total         Community-based Care (Arm A)   Facility-based Care (Arm B)   Test         p-value |
  |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                   N=344         N=180                          N=164                                              |
  |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | For what purpose did this member use the borrowed funds during the last period                                                                               Chi-square   <0.001  |
  |    To pay off other debts, including unpaid workers and outstanding GISHE loans   0.6% (2)      0.0% (0)                       1.2% (2)                                           |
  |    to buy farm inputs such as seeds, ox plough, farm land, seeds                  8.1% (28)     8.3% (15)                      7.9% (13)                                          |
  |    To pay school fees for children, and other school expenses (paper, uniforms)   26.2% (90)    27.8% (50)                     24.4% (40)                                         |
  |    To pay medical expenses(health insurance, medical fees, medications)           8.1% (28)     8.3% (15)                      7.9% (13)                                          |
  |    To trade and invest in small business                                          40.1% (138)   46.7% (84)                     32.9% (54)                                         |
  |    To repair shelter or homestead                                                 0.6% (2)      0.6% (1)                       0.6% (1)                                           |
  |    Other purpose                                                                  7.3% (25)     2.2% (4)                       12.8% (21)                                         |
  |    To buy farm animals                                                            1.5% (5)      2.8% (5)                       0.0% (0)                                           |
  |    To buy household food                                                          1.2% (4)      1.1% (2)                       1.2% (2)                                           |
  |    Funeral expenses                                                               0.9% (3)      1.1% (2)                       0.6% (1)                                           |
  |    Transportation expenses                                                        1.7% (6)      1.1% (2)                       2.4% (4)                                           |
  |    Missing                                                                        3.8% (13)     0.0% (0)                       7.9% (13)                                          |
  +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Data are presented as % (n).
 
file P:\Omar Projects\Harambee R01\Aim 3\SSM Manuscript - Analysis of GISHE Performance\\Source\table S2b.xlsx saved

. restore 

. 
. 
. 
. 
. clear

. log close       
      name:  <unnamed>
       log:  P:\Omar Projects\Harambee R01\Aim 3\SSM Manuscript - Analysis of GISHE Performance\\Source\LogGISHE_data.log
  log type:  text
 closed on:  15 Apr 2024, 14:59:40
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
